﻿using System;
using System.Collections.Generic;
using System.Text;

namespace FySystem.AssistantServices
{
    public interface IAssistantServiceContext
    {
        /// <summary>
        /// 添加服务
        /// </summary>
        /// <param name="type"></param>
        IAssistantService AddService<T>(string key);

        /// <summary>
        /// 获取服务
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="key"></param>
        /// <returns></returns>
        T GetService<T>(string key);

        /// <summary>
        /// 依次执行服务（多线程）
        /// </summary>
        void Run();
    }
}
